package com.meida.zsd.app.user.handler;


import com.meida.common.base.entity.EntityMap;
import com.meida.common.mybatis.interceptor.GetInterceptor;
import com.meida.common.mybatis.query.CriteriaQuery;
import com.meida.common.security.OpenHelper;
import com.meida.module.user.provider.service.AppUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 用户信息扩展
 * @author zyf
 */
@Component
public class UserInitHandler implements GetInterceptor {

    @Autowired
    private AppUserService appUserService;

    @Override
    public void prepare(CriteriaQuery cq, EntityMap entityMap) {
    }

    @Override
    public void complete(CriteriaQuery cq, EntityMap map) {
        Long userId = OpenHelper.getUserId();
        map.put("openId", "123456789");
    }
}
